 {include file="index@public/header" /}
<style type="text/css">
  ::-webkit-scrollbar{
    width:8px;
    height: 6px;
  }
  ::-webkit-scrollbar-thumb{
    border-radius: 10px;
    box-shadow: 0 0 1px rgb(255 255 255 / 50%);
    background-color: rgba(0, 0, 0, .2);
  }
  ::-webkit-scrollbar-track-piece{
    border-radius: 10px;
    box-shadow: 0 0 1px rgb(255 255 255 / 50%);
    background-color: #ededed;
  }
  
  @media screen and (min-width: 768px) {
    .pc-list{display: block;}
    .phone-list{display: none;}
    .phone-balllist-tab{display: none;}
  }
  @media screen and (max-width: 768px) {
      .pc-list{display: none;}
      .phone-list{display: block;}
      .phone-balllist-tab{display: block;}
  }
  
  .selall img{float: left;margin-top:2px;}
  .selzhi{
    color:#36648a;text-decoration:none;font: 12px/14px arial,helvetica,sans-serif;
    display: inline-block;
    width:100%;
    float: left;
  }
  /*.selzhi:hover{
     background-color: #36648a;
  }*/
  /*.selall:hover{
    background-color: #36648a;
  }*/
  .selall:hover{
    background-color: #36648a;
  }
  .selall:hover a{
    color: #ffffff;
  }
  body{background-color:#ffffff}
  .gaol{background-color: #EFEFEF;}
  .delail_list{margin-top:10px;cursor:pointer;}
  .Part_No {color:#36648a;}
  .delail_list .price-a{color:#19792f}
  .delail_list:hover{background-color: #36648a;}
  .delail_list:hover div {color:#ffffff;background-color: #36648a;}

   #gengduoli {padding: 3px;}
   #gengduoli>.gengduoli,  #gengduoli1>.gengduoli {
      text-align: justify;
      max-width: 1230px;
      width: 98%;
  }
  #gengduoli>.gengduoli *{
    margin: unset;
    padding: revert;
  }

  #gengduoli1>.gengduoli *{
    margin: unset;
    padding: revert;
    list-style: revert;
  }
.balllist .balllist-a a{display:block;}
.balllist .balllist-a a:hover{color:#36648A;}
.balllist .balllist-a a:hover .plist{border:1px solid #36648A;}
.balllist-a{
  padding: 5px 8px;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
}
.balllist-h{
  margin-left: 5px;
  padding-bottom:2px;
 }
          
.plist{
  height: 120px;
  border:1px solid #ccc;
  border-radius: 8px;
  padding:10px 5px 5px 5px;
  display: flex;
}
.plist-left{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plist-right{
  flex:3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plist-title{
  width: 100%;
  padding-bottom: 5px;
 font: 14px/16px Titillium Web,sans-serif;
}
          
.plist-desc{
  color: #333;
  line-height:16px;
}
.plist-icon img{
  max-width: 75%;
  object-fit: contain;
  object-position: 50% 50%;
}
.balllist a{text-decoration:none;}
#search {
    margin:10px 0 50px;
    width: 290px;
    color: #000;
    font-weight: 500;
    
}
#search .input-box {
    position: absolute;
    width: inherit;
    height: 38px;
    box-shadow: 0 2px 8px 1px rgb(64 60 67 / 24%);
}
#search input {
    height: inherit;
    border: 2px solid #d9e8ee;
    padding: 0 45px 0 20px;
}
.layui-layer-setwin {
  right: 0;
  top: 3px;
  cursor: pointer;
}
.layui-icon-search, .layui-icon-search:hover {
  background-color: unset;
}
@media screen and (max-width:768px) {
  .balllist .balllist-a .plist{padding:3px;}
  .balllist .balllist-a .plist .plist-title{padding-bottom:2px;font-size:14px}
}
.layui-flow-more {position:absolute;left: calc(50% - 60px);width:120px;}
#demo3 {margin-top:27px;display: flex;justify-content: center;}
#demo3 .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: #36648a;}
         
/*分页*/
.pagination{height: 20px;line-height:20px;}
.pagination li { float: left;text-align:center;cursor:pointer; padding: 0px 5px;}
.pagination li a{width:100%;height:100%;display:inline-block;text-decoration: none;}          
.pagination .disabled{color:#e2e2e2}
.pagination .active{text-decoration: underline;}
.balllist .balllist-a a{display:block;}
          .balllist .balllist-a a:hover{color:#36648A;}
          .balllist .balllist-a a:hover .plist{border:1px solid #36648A;}
          .balllist-a{
            padding: 5px 8px;
            font-family: Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
          }
          .balllist-h{
            margin-left: 5px;
            padding-bottom:2px;
          }
          
          .plist{
            height: 120px;
            border:1px solid #ccc;
            border-radius: 8px;
            padding:10px 5px 5px 5px;
            display: flex;
          }
          .plist-left{
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
          }
          .plist-right{
            flex:3;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          .plist-title{
            width: 100%;
            padding-bottom: 5px;
            font: 14px/16px Titillium Web,sans-serif;
          }
          
          .plist-desc{
            color: #333;
            
            line-height:16px;
          }
          .plist-icon img{
            max-width: 75%;
            object-fit: contain;
            object-position: 50% 50%;
          }
          .balllist a{text-decoration:none;}

          @media screen and (max-width:768px) {
            .balllist .balllist-a .plist{padding:3px;}
            .balllist .balllist-a .plist .plist-title{padding-bottom:2px;font-size:14px}
          }
          .layui-flow-more {position:absolute;left: calc(50% - 60px);width:120px;}
          #demo3 {margin-top:27px;display: flex;justify-content: center;}
          #demo3 .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: #36648a;}
         

            /*分页*/
            .pagination{height: 20px;line-height:20px;}
            .pagination li { float: left;text-align:center;cursor:pointer; padding: 0px 5px;}
            .pagination li a{width:100%;height:100%;display:inline-block;text-decoration: none;}
            
            .pagination .disabled{color:#e2e2e2}
            .pagination .active{text-decoration: underline;}
</style>

<div class='pc-list' style='font: 12px/14px arial,helvetica,sans-serif;'>
  <div style="background-color:#fff !important">
   <!-- 左侧筛选 -->
    <div class='list-left' id="list-left" style="width: 248px;float:left;position:sticky;top:61px;position:-webkit-sticky;">
      <div id="list-left-a" style="overflow-x:hidden;overflow-y:auto;height: calc(100vh - 61px);border:1px solid #E4E3E2;width:98%;margin-left:1%;border-radius:3px;margin-bottom:5px;">
        <div style="margin:0;height:100%;">
        {foreach $listkey as $key=>$vo }

        <?php if($vo['is_nosearch']=='1'){  $nosearch=Db::table('lily_listkey_nosearch')->field('value,url')->where('list_key_id','=',$vo['id'])->order('seq')->select();?>
        <div style="border-bottom: 1px solid black;padding-bottom:10px;background-color:#EFEFEF">
          <div style="height:30px;line-height:30px;padding-left:5px">
            <?php if(!empty($vo['alias'])){ ?><div>{:lang($vo['alias'])}</div><?php }else{ ?><div>{:lang($vo['wname'])}</div><?php }?>
          </div> 
          <div style="padding-left:5px;background-color: #EFEFEF">
              <div style="text-align:left;padding:3px 5px;overflow-x: hidden;width:88%;">
                {foreach $nosearch as $k1=>$v1 }
                <a href="{$v1['url']}" style="padding-left:5px;display: block;text-decoration: none;">
                  {:lang($v1['value'])}
                </a>
                {/foreach} 
              </div>
            </div>    
          </div>  
        <?php } ?>

        
        <?php if(!empty($vo['data'])){ ?>

          <div style="border-bottom: 1px solid black;padding-bottom:10px;background-color:#EFEFEF">

            <div style="height:30px;line-height:30px;padding-left:5px">
              <?php if(!empty($vo['alias'])){ ?><div>{:lang($vo['alias'])}</div><?php }else{ ?><div>{:lang($vo['wname'])}</div><?php }?>
            </div> 

            <div style="padding-left:5px;background-color: #EFEFEF">

              <?php if(!empty($vo['img'])){?>
              <div style="text-align:center;margin-bottom:5px;">
                <img style="width: 100px" src="{:Config::get('app.images_host').$vo['img']}?format=webp" alt="{$vo['wname']}">
              </div>  
              <?php } ?>

              <?php if(count($vo['data'])>11){?>
              <?php if($vo['is_have_input']=='1'){?>
              <div style="text-align:center;width:90%;margin-left:3px;margin-bottom:5px">
                <input type="text" name="sel<?php echo md5($vo['wname']);?>" onkeyup="selinput_zi('sel<?php echo md5($vo['wname']);?>')" style="border: 1px solid #ccc;border-radius:3px;height:20px;width:100%;padding-left:5px;margin-left:-3px" placeholder="输入过滤" autocomplete="off">
              </div>
              <?php } ?>
              <?php } ?>

              <?php if($vo['is_nosearch']=='1'){?>
              <div style="text-align:center;padding:3px 5px;border:1px solid #ccc;overflow-x: hidden;background-color:#ffffff;width:88%;">
                {foreach $vo['data'] as $k1=>$v1 }
                <?php  
                  $nosearch=Db::table('lily_listkey_nosearch')->field('url')->where([['list_key_id','=',$vo['id']],['value','=',$v1['key']]])->find();
                if(!empty($nosearch)){
                  $shai_url=$nosearch['url'];
                }else{
                  $shai_url='';
                }?>
                <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px;">
                  {:lang($v1['key'])}
                </a>
                {/foreach} 
              </div>
              <?php }else{ ?>
                <?php if($vo['is_images']=='1'){?>
                  <div style="display:flex;  flex-wrap:wrap; align-items:center; text-align:center;">
                  {foreach $vo['data'] as $k1=>$v1 }
                  <?php if(!empty($v1['key'])&&$v1['key']!=''){
                    if(empty($get)){
                      $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                    }else{
                      $shai_url=$base_data['no_parameter_url'].'?';
                      foreach ($get as $getkey => $getvalue) {
                        if($getkey=='part_number'){ $getkey='p';}
                          if($getkey!=str_replace(' ','_',$vo['wname'])){
                                  $shai_url.=$getkey.'='.$getvalue.'&';
                          }
                      }
                      if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                        $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                      }else{
                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                      }

                    }
                    $esimages=Db::table('lily_listkey_images')->where([['list_key_id','=',$vo['id']],['value','=',$v1['key']]])->find();
                      
                  ?>
                    <div style="width: calc(100% / 2); height: 70px;">
                      <?php if(!empty($esimages)){?>
                      <a href="{$shai_url}"><img src="{:Config::get('app.images_host')}{$esimages['images']}" style="height: 35px; object-position: 50% 50%;"></a>
                      <?php } ?>
                      <a href="{$shai_url}" style="text-decoration: none;"><div>{:lang($v1['key'])}</div></a>
                    </div>
                    <?php } ?>
                    {/foreach}
                    <div style="clear:both"></div>
                  </div>
                  <?php }else{ ?>

                    <?php if($vo['is_show_block']=='1'){?>
                      <?php if(count($vo['data'])>11){?>
                      <div style="text-align:center;padding:3px 5px;border:1px solid #ccc;overflow-y:auto;overflow-x: hidden;height:170px;background-color:#ffffff;width:88%;">
                        {foreach $vo['data'] as $k1=>$v1 }
                        <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                        <div style="width:100%; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="sel<?php echo md5($vo['wname']);?>body-left-div selall">
                        <?php 
                          if(empty($get)){
                            $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                          }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                              if($getkey=='part_number'){ $getkey='p';}
                                if($getkey!=str_replace(' ','_',$vo['wname'])){
                                    $shai_url.=$getkey.'='.$getvalue.'&';
                                }
                              }
                              if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                              }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                              }
                            }
                            ?>
                            <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px; text-decoration: none;">
                               <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                                <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                                <?php } ?>
                              <span>{:lang($v1['key'])}</span>
                            </a>
                          </div>
                          <?php } ?>
                          {/foreach}
                      </div>
                      <?php }else{ ?>
                        <div style="text-align:left;padding:3px 5px;overflow-x: hidden;width:88%;">
                        {foreach $vo['data'] as $k1=>$v1 }
                        <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                        <div style="width:100%; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="selall">
                        <?php 
                          if(empty($get)){
                            $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                          }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                              if($getkey=='part_number'){ $getkey='p';}
                                if($getkey!=str_replace(' ','_',$vo['wname'])){
                                    $shai_url.=$getkey.'='.$getvalue.'&';
                                }
                              }
                              if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                              }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                              }
                            }
                            ?>
                            <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px; text-decoration: none;">
                               <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                                <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                                <?php } ?>
                              <span>{:lang($v1['key'])}</span>
                            </a>
                            
                          </div>
                          <?php } ?>
                          {/foreach}
                      </div> 
                      <?php } ?>      
                    <?php }else{ ?>


                    <?php 
                      if(count($vo['data'])>11){
                        if($vo['show_lie']=='1'){
                          $height='auto';
                          $width="100%";
                        }else{ 
                          $width=(100/$vo['show_lie']);
                          $width=$width."%";
                          $height="calc(16px * ".$vo['lie_num'].")";
                        }
                      }else{
                        $width=(100/$vo['show_lie']);
                        $width=$width."%";
                        $height="calc(16px * ".$vo['lie_num'].")";
                      }
                    ?>
                    <div style="display:flex; flex-direction: column; flex-wrap:wrap; height:{$height};  align-items:center; text-align:left;">
                      {foreach $vo['data'] as $k1=>$v1 }
                      <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                      <div style="width:{$width}; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="selall">
                      <?php 
                        if(empty($get)){
                          $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                        }else{
                          $shai_url=$base_data['no_parameter_url'].'?';
                          foreach ($get as $getkey => $getvalue) {
                          if($getkey=='part_number'){ $getkey='p';}
                            if($getkey!=str_replace(' ','_',$vo['wname'])){
                                $shai_url.=$getkey.'='.$getvalue.'&';
                            }
                          }
                          if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                            $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                          }else{
                            $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                          }
                        }
                      ?>
                        
                        <a href="{$shai_url}" class="selzhi" style="padding-left:5px; text-decoration: none;">
                            <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                              <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                              <?php } ?>
                            <span>{:lang($v1['key'])}</span>
                        </a>
                      </div>
                      <?php } ?>
                      {/foreach}
                    </div>      
                    <?php } ?>
                  <?php } ?>
                  
              <?php } ?>

               
                  
            </div> 
          </div>
        <?php } ?>
        {/foreach} 
        </div>
         
        </div>
    </div>
    
    <!-- 右侧主体内容 -->
    <div class="list-right" style="width: calc(100% - 248px);;float: right;padding-bottom: 0px;">
      <div style="padding: 2px 5px">
        <!-- 面包屑 -->
        <div class="layui-breadcrumb" lay-separator="/" style="visibility: visible;padding-top:5px;">
          {foreach $crumbs as $k=>$v }
          <?php if($k!=count($crumbs)-1){?>
          <a href="/{$v['crumbs_url']}" style="font: 12px/14px arial,helvetica,sans-serif;color:#36648A">{$v['alias_name']}</a>
          <?php }else{ ?>
          <span style="font: 12px/14px arial,helvetica,sans-serif;"> <span style="padding-left: 10px;color: #999">/</span> <cite style="color: #666;padding-right:20px">{$class_info['alias_name']}</cite></span>
          <?php } ?>
          {/foreach}
        </div>
        
         <!-- 筛选信息 -->
        <?php if(!empty($get)){?>
        <div style="padding:5px 10px">
          <div style="display:inline-block;color:#36648a;cursor:pointer;" onclick="clearall()">清空</div>
          {foreach $get as $key=>$vo }
          <?php 
            if($key=='part_number'){ 
              $key='Part_Number'; 
            }
          ?>
          <div style="display:inline-block;margin-left:10px;border:1px solid #ccc;padding:0px 5px;border-radius:3px">
            <span>{:lang(str_replace('_',' ',$key))}</span> | <span>{:lang($vo)}</span> <i class="layui-icon layui-icon-close" style="font-size:12px;margin-top:2px;cursor:pointer;" onclick="del_search('{$key}','{$vo}')"></i></div>
          {/foreach}
        </div>
        <?php } ?>

       <!-- h1和产品数量 -->
        <?php
          if(empty($class_info['alias_name'])){
            $h1_str=$class_info['cname'];
          }else{ 
            $h1_str=$class_info['alias_name'];
          }
          if(empty($get)){
              $h1=$h1_str;
          }else{
              $h1xz="";
              foreach ($get as $key=>$vo) {
                $h1xz.=lang(str_replace('_',' ',$key)).lang($vo).", ";
              }
              $h1=rtrim($h1xz,', ').' '.$h1_str;
          }
        ?>
        <div style="background-color: #EFEFEF;height:32px;line-height:32px;">
          <h1 style="display: inline;font-size:18px;padding-left:5px">{$h1}</h1>
          <span style="padding: 0px 20px">{$table_count}产品</span>
        </div>
        
        <?php if($class_info['id'] == 600){?>
        <div id="search" class="{$class_info['id']}">
          <div class="input-box">
              <input type="text" placeholder='Search for example "6902"' value="" class="layui-input"/>
              <span class="layui-layer-setwin"><i class="layui-icon layui-icon-search" id="layui-icon-search" onclick="sear_part()"></i></span>
          </div>
        </div>
        <?php } ?>
            <div class="layui-row balllist">
                <?php if(!empty($class_notag)){?>
                <div class="balllist-body">
                {foreach $class_notag as $key=>$value }
                    <div class="layui-col-sm3 layui-col-xs12 balllist-a">
                        <a href="/{$value['first']['class_url']}">
                            <div class="plist">
                                <div class="plist-left plist-icon">
                                  <img src="{:Config::get('app.images_host').$value['first']['img']}?format=webp" alt="{$value['first']['alias_name']}">
                                </div>
                                <div class="plist-right">
                                    <div class="plist-title">{$value['first']['alias_name']}</div>
                                    <div class="plist-desc">{$value['first']['block_des']}</div>
                                </div>
                            </div>
                        </a>
                    </div>
                {/foreach}
                    <div style="clear:both;"></div>
                </div>
                <?php } ?>
                <?php if(!empty($class_tag)){?>
                {foreach $class_tag as $key=>$value }
                <div class="balllist-h">
                    <h2 style="font-size:14px;margin-top:10px;padding-left:5px;float: left;margin-right: 10px;">{$value['first']['alias_name']}</h2>
                    <div style="clear:both;"></div>
                </div>
           
               <div class="balllist-body">
               {foreach $value['second'] as $k=>$v }
                    <div class="layui-col-sm3 layui-col-xs12 balllist-a">
                        <a href="/{$v['class_url']}">
                            <div class="plist">
                                <div class="plist-left plist-icon">
                                  <img src="{:Config::get('app.images_host').$v['img']}?format=webp" alt="{$v['alias_name']}">
                                </div>
                                <div class="plist-right">
                                    <div class="plist-title">{$v['alias_name']}</div>
                                    <div class="plist-desc">{$v['block_des']}</div>
                                </div>
                            </div>
                        </a>
                    </div>
                {/foreach}
                    <div style="clear:both;"></div>
                </div>
                {/foreach}
                <?php } ?>
            </div>
            
        
        <?php if(!empty($classify_content)){?>          
        <div id="gengduoli1">
            <div style="padding-top:3px;color:#333;padding-left:5px;margin-bottom:10px" class="gengduoli">
               <?php if(!empty($get)){?>
                 {:htmlspecialchars_decode(str_replace('[SEOstr]',$SEOstr,$classify_content['filter_total_des']))}
              <?php } ?>
            </div>
        </div>
        <?php } ?>
      </div>
    </div>     
      
     
    
    <div class="clear"></div>
  </div>
</div>
  

{include file="index@public/footer" /}

<script type="text/javascript">
  /*左侧筛选*/
function selinput_zi(k) {
    let zhi=$('input[name="'+k+'"]').val();
    if(zhi != ''){
      zhi = zhi.toUpperCase();
      $(`.${k}body-left-div`).hide().filter(function(index){
        return $(`.${k}body-left-zhi`+":contains('"+zhi+"')", this).text();
      }).show();
    }else{
      $("."+k+"body-left-div").show();
    } 
}
/*清空*/
function clearall() {
    layer.load(1, {
      shade: [0.1, '#fff'],
      success: function() {
        setTimeout(function() {
          var url = window.location.href; //获取当前页面的url
          if (url.indexOf("?") != -1) { //判断是否存在参数
            url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数
          }
          window.location.href = url;
        }, 1000);
      }
  });
}

/*单个清空*/
function del_search($k, $v) {
    if($k=='Part_Number'){
      $k='p';
    }
    var url = window.location.href; //获取当前页面的url
    let arrUrl = [];
    let changUrl = ''
    if (url.indexOf("?") != -1) { //判断是否存在参数
      arrUrl = url.split('?')[1].split('&')
      //获取参数转换为object
      for (var i = 0; i < arrUrl.length; i++) {
        arrUrl[i] = arrUrl[i].split("=");
      };
      for (var i = 0; i < arrUrl.length; i++) {
        if(arrUrl[i][0]==encodeURI($k)){
                    arrUrl.splice(i,1);
        }
      }
      if(arrUrl.length == 0){
        url = url.split('?')[0];
      }else{
        for (var i = 0; i < arrUrl.length; i++) {
          changUrl+=arrUrl[i][0]+'='+arrUrl[i][1]+'&';
        }

        url=url.split('?')[0]+'?'+changUrl.slice(0, changUrl.length - 1);
      }
      window.location.href=url;
    }
}

$(".layui-input").on("keyup", function (e) {
  if (e.keyCode == 13) 
    sear_part()
});
// 陶瓷轴承，型号搜索
function sear_part(){
  layer.load(1);
  var Part_No=$.trim($('#search input').val());
  var class_id=$.trim($('#search').attr('class'));

  if(Part_No==''){
      layer.closeAll('loading');
      layer.msg('Please enter the Part No');
      return false;
  }

  var queryStr = window.location.search.replace('?', '')
  var host = window.location.pathname
  query = queryStr.split('&')

  new_query = [];
  for(i in query){
      if(query[i].indexOf('p=') == -1){
          console.log(query[i])
          new_query.push(query[i])
      }
  }
  queryStr = new_query.join('&')
  $.post('/index/Api/check_part_number2/?'+queryStr, {Part_No:Part_No,class_id:class_id},function(res){
    if(res.status=='1'){
      new_queryStr = new_query.join('&')
      window.location.href= host + '?' + new_queryStr + '&p='+ Part_No;
    }else{
        layer.msg(res.msg);
        $('#search input').val('');
        layer.closeAll('loading');
    }
  })
}

 /*左侧筛选后，定位滚动条位置*/
<?php if(!empty($get)){?>
if($("#xz-srcoll").length>0){
var a=$("#xz-srcoll").position().top-180;
document.getElementById('list-left-a').scrollTop=a;
}
<?php } ?>
</script>